#ifndef _GALAXYDOMINATION_H_
#define _GALAXYDOMINATION_H_

#include <FApp.h>
#include <FBase.h>
#include <FSystem.h>
#include <FUi.h>
#include "IHandleMenuEvent.h"

/**
 * [GalaxyDomination] application must inherit from Application class
 * which provides basic features necessary to define an application.
 */



namespace Galaxy{

class GalaxyView;
class MainMenuView;
class GalaxyThread;
class GalaxyMap;

class GalaxyDomination :
	public Osp::App::Application,
	public Osp::System::IScreenEventListener,
	public IHandleMenuEvent
{
public:

	/**
	 * [GalaxyDomination] application must have a factory method that creates an instance of itself.
	 */
	static Osp::App::Application* CreateInstance(void);

public:
	GalaxyDomination();
	~GalaxyDomination();

public:
	bool OnAppInitializing(Osp::App::AppRegistry& appRegistry);
	bool OnAppTerminating(Osp::App::AppRegistry& appRegistry, bool forcedTermination = false);
	void OnForeground(void);
	void OnBackground(void);
	void OnLowMemory(void);
	void OnBatteryLevelChanged(Osp::System::BatteryLevel batteryLevel);
	void OnScreenOn (void);
	void OnScreenOff (void);

public:
	void HandleButtonEvent(const Osp::Ui::Control& source, int actionId);


public:
	void LoadGameData();
	void SaveGameData();
	void ResetGameData();
	void PlayGame(const Osp::Base::String& campaignName);
	void StartGame(GalaxyMap* pMap);
	void PrepareGame();

private:
	MainMenuView* __pMainMenuView;
	GalaxyView* __pGalaxyView;

	//Not own
	GalaxyThread* __pThread;

private:
	int __playerForce;
	int __playerDefense;
	int __playerSpeed;
	int __playerGrowing;
	int __campaignLevel;
	int __level2v2;
	bool __isCustomLevelEnabled;
	int __customLevel;
	int __customLevelForce;
	int __customLevelDefense;
	int __customLevelGrowing;
	int __customLevelSpeed;
	int __customLevelAILevel;

	Osp::Base::String __campaignName;

public:
	static int __aiType;
	static int __isHellMode;
	static int __isSpeedyMode;
	static int __isLowPerf;
	static int __isSoundEnable;

//About audio
public:

};
}

#endif
